package com.qqt.csr.order.enums;

import lombok.Getter;

@Getter
public enum WorkOrderStatusEnum {

    NONE("NONE", "初始状态"),
    TO_CLAIM("TO_CLAIM", "待认领"),
    TO_PROCESS("TO_PROCESS", "待处理"),
    SUSPENDED("SUSPENDED", "已挂起"),
    COMPLETED("COMPLETED", "已完成"),
    ;

    private String status;
    private String desc;

    WorkOrderStatusEnum(String status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public static WorkOrderStatusEnum getByStatus(String status) {
        for (WorkOrderStatusEnum value : WorkOrderStatusEnum.values()) {
            if (value.getStatus().equals(status)) {
                return value;
            }
        }
        return null;
    }
}
